package com.symbio.ishenapi.order.controller;

import com.symbio.ishenapi.common.controller.BaseController;
import com.symbio.ishenapi.order.model.TmOrderCount;
import io.jboot.web.controller.annotation.RequestMapping;

import java.util.Map;

@RequestMapping("/orderCount")
public class TmOrderCountController extends BaseController {

    public void saveOrderCount(){
        TmOrderCount toc = (TmOrderCount) getReqBodyObject(TmOrderCount.class);
        toc.setCount(5);
        if (toc.save()){
            renderJsonRet(toc.getCount());
        }else {
            renderJsonError(40001);
        }
    }
    /**
     * @Author jianghy
     * @Description 根据医生id查询为患者服务的次数和患者的数量
     * @date
     * @return void
     */
    public void queryFwCountAndPatientCount(){
        String doctorId = getPara("doctorId");
        Map map = TmOrderCount.dao.queryFwCountAndPatientCount(doctorId);
        renderJsonRet(map);
    }

}
